<script type="text/javascript" src="/kkpager/kkpager.js"></script>
<script type="text/javascript" src="/js/adm/vb-kkpager.js"></script>
<h1 class="page_title">作业管理</h1>
<span class="btn-upload form-group" style="margin-bottom: 15px;">
        <input class="input-text" type="text" id="keyword"
               <#if keyword??>
                   value="${keyword}"
               </#if>
               style="width:200px" placeholder="VB综测题3">
        <a href="javascript:research('/stu/project','作业管理');" class="btn btn-primary upload-btn"><i
                    class="Hui-iconfont">&#xe665;</i> 搜 索</a>
    </span>
<#if pageBean.content?size != 0>
<table class="table table-border table-bordered table-hover">

    <thead>
    <tr>
        <th>作业名称</th>
        <th>作业类型</th>
        <th>发布时间</th>
        <th>最大提交次数</th>
        <th>状态</th>
        <th style="width: 18%">操 作</th>
    </tr>
    </thead>
    <tbody>
    <#list pageBean.content as bean>
        <tr>
            <td><input class="input-text" id="project${bean.projectId}"
                       readonly="readonly" disabled value="${bean.projectName}"></td>
            <td>
                <#if bean.classification == "0">
                    实例题
                <#else>
                    设计题
                </#if>
            </td>
            <td>${bean.upTime}</td>
            <td>
                ${bean.upTimesMax}次
            </td>
                <#if bean.status == "1">
            <td style="color: blue">
                    可提交
            </td>
                <#else>
            <td style="color: red">
                    不可提交
            </td>
                </#if>
            <td>
                <input class="btn btn-secondary radius" type="button" value="作业详情"
                       onclick="selectProject(${bean.projectId})">
                <input class="btn btn-primary radius" type="button" value="提交作业"
                       onclick="selectProject(${bean.projectId})">
            </td>
        </tr>
    </#list>
    <#else>
        <div class="text-c" style="height: 300px;"><h3>无记录.</h3></div>
    </#if>
    <tr>
        <td colspan="6">
            <div id="kkpager"></div>
        </td>
    </tr>
    </tbody>
    <tfoot>
    </tfoot>
</table>
<script>
    var changeView = function (n) {
        selectView("/stu/project/?pageNum=" + n + "&keyword=" + "${keyword!''}", "班级详情");
    };
    var selectProject = function (id) {
        selectView("/stu/project/" + id, "班级详情");
    };

    var editProject = function (id, btn) {
        var editInput = $("#project" + id);
        editInput.removeAttr("readonly");
        editInput.removeAttr("disabled");
        $(btn).val("确 定");
        $(btn).attr("onclick", "confirmEdit(" + id + ", this)");
    };
</script>
<script type="text/javascript">
    generateKK(${pageBean.pageNum}, ${pageBean.pageCount}, ${pageBean.rowCount});
</script>